#
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Inherit from qiku sdm660-common
-include device/qiku/sdm660-common/BoardConfigCommon.mk

DEVICE_PATH := device/qiku/QK1707

# Assertions
TARGET_OTA_ASSERT_DEVICE := QK1707,360N6,1707-A01,qk1707

# Boot animation
TARGET_SCREEN_HEIGHT := 2160
TARGET_SCREEN_WIDTH := 1080

#BOARD_SUPPORTS_OPENSOURCE_STHAL := true

# Camera
ifndef BOARD_QIKU_CAMERA_HAL
    USE_CAMERA_STUB := true
else
    USE_CAMERA_STUB := false
    TARGET_SUPPORT_HAL1 := true
    BOARD_QTI_CAMERA_32BIT_ONLY := true
    $(call project-set-path,qcom-camera,$(DEVICE_PATH)/camera)
endif

# Display
TARGET_SCREEN_DENSITY := 480

# HIDL
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/configs/manifests/manifest.xml

#make boot and recovery Kernel
#TARGET_USES_PREBUILT_KERNEL := true

# Kernel
ifdef TARGET_USES_PREBUILT_KERNEL
    TARGET_PREBUILT_KERNEL := device/qiku/QK1707/kernel
    TARGET_PREBUILT_RECOVERY_KERNEL := device/qiku/QK1707/kernel
else
    TARGET_KERNEL_SOURCE := kernel/xiaomi/sdm660
#    TARGET_KERNEL_CONFIG := platina_defconfig
    TARGET_KERNEL_CONFIG := lavender_defconfig
endif

# Partitions
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384
BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USERDATAIMAGE_PARTITION_SIZE := 55155064320 # 55155080704 - 16384
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432

# SELinux
BOARD_PLAT_PUBLIC_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/public
BOARD_PLAT_PRIVATE_SEPOLICY_DIR += $(DEVICE_PATH)/sepolicy/private
BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor

# inherit from the proprietary version
-include vendor/qiku/QK1707/BoardConfigVendor.mk

